<script lang="ts" setup>
import { ref } from 'vue'
const emits = defineEmits(['change'])
const isOpen = ref<boolean>(false)
const handleChange = () => {
  emits('change', isOpen.value)
}
</script>

<template>
  <div class="control-resite">
    <el-switch
      v-model="isOpen"
      size="large"
      active-text="打开显示"
      inactive-text="关闭显示"
      :active-value="true"
      :inactive-value="false"
      @change="handleChange"
    />
  </div>
</template>

<style scoped lang="scss">
.control-resite {
  position: absolute;
  bottom: 15px;
  right: 70px;
  z-index: 200;
  background-color: var(--xy-white-color);
  padding: 10px;
  border-radius: 10px;
}
</style>
